
export class HomeBanner {
    id: number;
    banner_id: number = 0;
    url: string;
    is_login: boolean;
    router: string;
    action_id: number;
    action: string;

    constructor() {
    }

    getFieldTypeMap():  Map<string, string> {
        let fieldTypeMap = new Map<string, string>();
        fieldTypeMap.set('id', 'Integer');
        fieldTypeMap.set('banner_id', 'Integer');
        fieldTypeMap.set('url', 'String');
        fieldTypeMap.set('is_login', 'Boolean');
        fieldTypeMap.set('router', 'String');
        fieldTypeMap.set('action_id', 'Integer');
        fieldTypeMap.set('action', 'String');
        return fieldTypeMap;
    }

    getClassName(): string {
        return 'home_banner';
    }

    getPrimaryKeyList(): string[] {
        let primaryKeyList: string[] = [];
        primaryKeyList.push('id');
        return primaryKeyList;
    }

    getIndexList(): string[] {
        let indexList: string[] = [];
        indexList.push('banner_id');
        return indexList;
    }

    getEncryptedFieldList(): string[] {
        let encryptedFieldList: string[] = [];
        return encryptedFieldList;
    }

    setId(id: number): void {
        this.id = id;
    }

    getId(): number  {
        return this.id;
    }

    setBanner_id(banner_id: number): void {
        this.banner_id = banner_id;
    }

    getBanner_id(): number  {
        return this.banner_id;
    }

    setUrl(url: string): void {
        this.url = url;
    }

    getUrl(): string  {
        return this.url;
    }

    setIs_login(is_login: boolean): void {
        this.is_login = is_login;
    }

    getIs_login(): boolean  {
        return this.is_login;
    }

    setRouter(router: string): void {
        this.router = router;
    }

    getRouter(): string  {
        return this.router;
    }

    setAction_id(action_id: number): void {
        this.action_id = action_id;
    }

    getAction_id(): number  {
        return this.action_id;
    }

    setAction(action: string): void {
        this.action = action;
    }

    getAction(): string  {
        return this.action;
    }

    static parseFrom(inputObject: any): HomeBanner {
        let result = new HomeBanner();
        if (!inputObject) {
            return result;
        }
        if (inputObject.id) {
            result.id = inputObject.id;
        }
        if (inputObject.banner_id) {
            result.banner_id = inputObject.banner_id;
        }
        if (inputObject.url) {
            result.url = inputObject.url;
        }
        if (inputObject.is_login) {
            result.is_login = inputObject.is_login;
        }
        if (inputObject.router) {
            result.router = inputObject.router;
        }
        if (inputObject.action_id) {
            result.action_id = inputObject.action_id;
        }
        if (inputObject.action) {
            result.action = inputObject.action;
        }
        return result;
    }
}
